
{%- assign title = page.twitterTitle | default: page.title -%} 
{%- assign image = page.twitterImage | default: page.image -%}

{%- if title -%}
{% if image %}
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image" content="{{ image | absolute_url }}"/>
{% else %}
<meta name="twitter:card" content="summary"/>
<meta name="twitter:image" content="{{ "/images/icon/twitter_icon.png" | absolute_url }}"/>
{% endif -%}

<meta name="twitter:title" content="{{ title | escape }}"/>

{%- if page.description %}
<meta name="twitter:description" content="{{ page.description | escape }}"/>
{% else %}
<meta name="twitter:description" content="{{ site.description | escape }}"/>
{%- endif -%}

{%- endif -%}